{smcl}
{* *! version 0.4 22-Apr-2020}{...}
{viewerjumpto "Title" "rdms##title"}{...}
{viewerjumpto "Syntax" "rdms##syntax"}{...}
{viewerjumpto "Description" "rdms##description"}{...}
{viewerjumpto "Options" "rdms##options"}{...}
{viewerjumpto "Examples" "rdms##examples"}{...}
{viewerjumpto "Stored results" "rdms##stored_results"}{...}
{viewerjumpto "References" "rdms##references"}{...}
{viewerjumpto "Authors" "rdms##authors"}{...}
{viewerjumpto "Also see" "rdms##alsosee"}{...}
{cmd:help rdms}{right: ({browse "https://doi.org/10.1177/1536867X20976320":SJ20-4: st0620})}
{hline}

{marker title}{...}
{title:Title}

{p2colset 5 13 15 2}{...}
{p2col:{cmd:rdms} {hline 2}}Analysis of regression-discontinuity designs with multiple scores{p_end}


{marker syntax}{...}
{title:Syntax}

{p 8 12 2}
{cmd:rdms} {it:depvar} {it:runvar1} [{it:runvar2 treatvar}] {ifin}{cmd:,}
{cmd:{opt c:var}(}{it:cutoff_var1} [{it:cutoff_var2}]{cmd:)}
[{cmd:range(}{it:range1} [{it:range2}]{cmd:)} 
{cmd:xnorm(}{it:string}{cmd:)} 
{cmd:fuzzy(}{it:string}{cmd:)} 
{cmd:{opt deriv:var}(}{it:string}{cmd:)} 
{cmd:pooled_opt(}{it:string}{cmd:)} 
{cmd:{opt p:var}(}{it:string}{cmd:)} 
{cmd:{opt q:var}(}{it:string}{cmd:)} 
{cmd:{opt h:var}(}{it:string}{cmd:)} 
{cmd:{opt hr:ightvar}(}{it:string}{cmd:)} 
{cmd:{opt b:var}(}{it:string}{cmd:)} 
{cmd:{opt br:ightvar}(}{it:string}{cmd:)} 
{cmd:{opt rho:var}(}{it:string}{cmd:)} 
{cmd:{opt covs:var}(}{it:string}{cmd:)} 
{cmd:{opt covsdrop:var}(}{it:string}{cmd:)} 
{cmd:{opt kernel:var}(}{it:string}{cmd:)} 
{cmd:{opt weights:var}(}{it:string}{cmd:)} 
{cmd:{opt bwselect:var}(}{it:string}{cmd:)} 
{cmd:{opt scalepar:var}(}{it:string}{cmd:)} 
{cmd:{opt scaleregul:var}(}{it:string}{cmd:)} 
{cmd:{opt masspoints:var}(}{it:string}{cmd:)} 
{cmd:{opt bwcheck:var}(}{it:string}{cmd:)} 
{cmd:{opt bwrestrict:var}(}{it:string}{cmd:)} 
{cmd:{opt stdvars:var}(}{it:string}{cmd:)} 
{cmd:{opt vce:var}(}{it:string}{cmd:)} 
{opt level(#)}
{cmd:plot}
{cmd:graph_opt(}{it:string}{cmd:)}]{p_end}

{pstd}
{it:depvar} is the dependent variable.  {it:runvar1} is the running variable
(also known as score or forcing variable) in a cumulative cutoffs setting.
{it:runvar2}, if specified, is the second running variable (also known as
score or forcing variable) in a two-score setting.  {it:treatvar}, if
specified, is the treatment indicator in a two-score setting.


{marker description}{...}
{title:Description}

{pstd}
{cmd:rdms} provides tools to analyze regression-discontinuity (RD) designs
with multiple scores.  For methodological background, see Keele and Titiunik
(2015) and Cattaneo et al. (2016, 2020).  It also computes alternative
estimation and inference procedures available in the literature.

{pmore}
If only {it:runvar1} is specified, {cmd:rdms} analyzes an RD design with
cumulative cutoffs in which a unit gets different dosages of a treatment
depending on the value of {it:runvar1}.  If {it:runvar1}, {it:runvar2}, and
{it:treatvar} are specified, {cmd:rdms} analyzes an RD design with two running
variables in which units with {it:treatvar} equal to one are treated.{p_end}

{pmore}
Companion commands are {helpb rdmc} for multicutoff RD estimation and
inference and {helpb rdmcplot} for multicutoff RD plots.{p_end}

{pmore}
A detailed introduction to this command is given in Cattaneo, Titiunik, and
Vazquez-Bare (2020).

{pmore}
Companion {browse "www.r-project.org":R} functions are also available
{browse "https://rdpackages.github.io":here}.{p_end}

{pmore}
This command uses the Stata (and R) package {helpb rdrobust} for underlying
calculations.  See Calonico, Cattaneo, and Titiunik (2014, 2015) and Calonico
et al. (2017) for more details.{p_end}

{pstd}
Related Stata and R packages useful for inference in RD designs are described
in the following website:{p_end}

{pmore}
{browse "https://rdpackages.github.io"}


{marker options}{...}
{title:Options}

{dlgtab:Estimand}

{phang}
{cmd:cvar(}{it:cutoff_var1} [{it:cutoff_var2}]{cmd:)} specifies the numeric
variable {it:cutoff_var1}, which indicates the cutoff faced by each unit in
the sample in a cumulative cutoff setting, or the two running variables
{it:cutoff_var1} and {it:cutoff_var2} in a two-score RD design.  {cmd:cvar()}
is required.

{phang}
{cmd:range(}{it:range1} [{it:range2}]{cmd:)} specifies the range of the
running variable to be used for estimation around each cutoff.  Specifying
only one variable implies using the same range at each side of the cutoff.

{phang}
{cmd:xnorm(}{it:string}{cmd:)} specifies the normalized running variable to
estimate pooled effect.{p_end}

{phang}
{cmd:fuzzy(}{it:string}{cmd:)} indicates a fuzzy design.  See {helpb rdrobust}
for details.{p_end}

{phang}
{cmd:derivvar(}{it:string}{cmd:)} specifies a variable of length equal to the
number of different cutoffs that specifies the order of the derivative for
{cmd:rdrobust} to calculate cutoff-specific estimates.  See {helpb rdrobust}
for details.{p_end}

{dlgtab:rdrobust options}

{phang}
{cmd:pooled_opt(}{it:string}{cmd:)} specifies the options to be passed to
{cmd:rdrobust} to calculate pooled estimates.  See {helpb rdrobust} for
details.{p_end}

{dlgtab:Local polynomial regression}

{phang}
{cmd:pvar(}{it:string}{cmd:)} specifies a variable of length equal to the
number of different cutoffs that specifies the order of the polynomials for
{cmd:rdrobust} to calculate cutoff-specific estimates.  See {helpb rdrobust}
for details.{p_end}

{phang}
{cmd:qvar(}{it:string}{cmd:)} specifies a variable of length equal to the
number of different cutoffs that specifies the order of the polynomials for
bias estimation for {cmd:rdrobust} to calculate cutoff-specific estimates.
See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:hvar(}{it:string}{cmd:)} specifies a variable of length equal to the
number of different cutoffs that specifies the bandwidths for {cmd:rdrobust}
to calculate cutoff-specific estimates.  When {cmd:hrightvar()} is specified,
{cmd:hvar()} indicates the bandwidth to the left of the cutoff.  When
{cmd:hrightvar()} is not specified, the same bandwidths are used at each side.
See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:hrightvar(}{it:string}{cmd:)} specifies a variable of length equal to the
number of different cutoffs that specifies the bandwidths to the right of the
cutoff for {cmd:rdrobust} to calculate cutoff-specific estimates.  When
{cmd:hrightvar()} is not specified, the same bandwidths in {cmd:hvar()} are
used at each side.  See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:bvar(}{it:string}{cmd:)} specifies a variable of length equal to the
number of different cutoffs that specifies the bandwidths for bias estimation
for {cmd:rdrobust} to calculate cutoff-specific estimates.  When
{cmd:brightvar()} is specified, {cmd:bvar()} indicates the bandwidth to the
left of the cutoff.  When {cmd:brightvar()} is not specified, the same
bandwidths are used at each side.  See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:brightvar(}{it:string}{cmd:)} specifies a variable of length equal to the
number of different cutoffs that specifies the bandwidths for bias estimation
to the right of the cutoff for {cmd:rdrobust} to calculate cutoff-specific
estimates.  When {cmd:brightvar()} is not specified, the same bandwidths in
{cmd:bvar()} are used at each side.  See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:rhovar(}{it:string}{cmd:)} specifies a variable of length equal to the
number of different cutoffs that specifies the value of rho for {cmd:rdrobust}
to calculate cutoff-specific estimates.  See {helpb rdrobust} for
details.{p_end}

{phang}
{cmd:covsvar(}{it:string}{cmd:)} specifies a variable of length equal to the
number of different cutoffs that specifies the covariates for {cmd:rdrobust}
to calculate cutoff-specific estimates.  See {helpb rdrobust} for
details.{p_end}

{phang}
{cmd:covsdropvar(}{it:string}{cmd:)} specifies a variable of length equal to
the number of different cutoffs that specifies whether collinear covariates
should be dropped.  See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:kernelvar(}{it:string}{cmd:)} specifies a variable of length equal to the
number of different cutoffs that specifies the kernels for {cmd:rdrobust} to
calculate cutoff-specific estimates.  See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:weightsvar(}{it:string}{cmd:)} specifies a variable of length equal to
the number of different cutoffs that specifies the weights for {cmd:rdrobust}
to calculate cutoff-specific estimates.  See {helpb rdrobust} for
details.{p_end}

{dlgtab:Bandwidth selection}

{phang}
{cmd:bwselectvar(}{it:string}{cmd:)} specifies a variable of length equal to
the number of different cutoffs that specifies the bandwidth selection method
for {cmd:rdrobust} to calculate cutoff-specific estimates.  See
{helpb rdrobust} for details.{p_end}

{phang}
{cmd:scaleparvar(}{it:string}{cmd:)} specifies a variable of length equal to
the number of different cutoffs that specifies the value of
{cmd:scaleparvar()} for {cmd:rdrobust} to calculate cutoff-specific estimates.
See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:scaleregulvar(}{it:string}{cmd:)} specifies a variable of length equal to
the number of different cutoffs that specifies the value of
{cmd:scaleregulvar()} for {cmd:rdrobust} to calculate cutoff-specific
estimates.  See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:masspointsvar(}{it:string}{cmd:)} specifies a variable of length equal to
the number of different cutoffs that specifies how to handle repeated values
in the running variable.  See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:bwcheckvar(}{it:string}{cmd:)} specifies a variable of length equal to
the number of different cutoffs that specifies the value of
{cmd:bwcheckvar()}.  See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:bwrestrictvar(}{it:string}{cmd:)} specifies a variable of length equal to
the number of different cutoffs that specifies whether computed bandwidths are
restricted to the range of {it:runvar}.  See {helpb rdrobust} for
details.{p_end}

{phang}
{cmd:stdvarsvar(}{it:string}{cmd:)} specifies a variable of length equal to
the number of different cutoffs that specifies whether {it:depvar} and
{it:runvar} are standardized.  See {helpb rdrobust} for details.{p_end}

{dlgtab:Variance-covariance estimation}

{phang}
{cmd:vcevar(}{it:string}{cmd:)} specifies a variable of length equal to the
number of different cutoffs that specifies the variance-covariance matrix
estimation method for {cmd:rdrobust} to calculate cutoff-specific estimates.
See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:level(}{it:#}{cmd:)} specifies the confidence level for confidence
intervals.  See {helpb rdrobust} for details.{p_end}

{dlgtab:Plot}

{phang}
{cmd:plot} plots the pooled and cutoff-specific estimates and the weights
given by the pooled estimate to each cutoff-specific estimate.

{phang}
{cmd:graph_opt(}{it:string}{cmd:)} specifies options to be passed to the graph
when {cmd:plot} is specified.{p_end}


{marker examples}{...}
{title:Examples}

{pstd}Standard use of {cmd:rdms} for cumulative cutoffs{p_end}
{phang2}{cmd:. rdms yvar xvar, c(cvar)}{p_end}

{pstd}{cmd:rdms} with plot{p_end}
{phang2}{cmd:. rdms yvar xvar, c(cvar) plot}{p_end}

{pstd}Standard use of {cmd:rdms} for multiple scores{p_end}
{phang2}{cmd:. rdms yvar xvar1 xvar2 treatvar, c(cvar)}{p_end}


{marker stored_results}{...}
{title:Stored results}

{pstd}
{cmd:rdms} stores the following in {cmd:e()}:

{synoptset 20 tabbed}{...}
{p2col 5 20 24 2: Matrices}{p_end}
{synopt:{cmd:e(b)}}bias-corrected coefficient vector{p_end}
{synopt:{cmd:e(V)}}robust variance-covariance matrix of the estimators{p_end}
{synopt:{cmd:e(coefs)}}conventional coefficient vector{p_end}
{synopt:{cmd:e(pv_rb)}}robust p-value vector{p_end}
{synopt:{cmd:e(CI_rb)}}bias-corrected confidence intervals{p_end}
{synopt:{cmd:e(H)}}vector of bandwidths at each side of each cutoff{p_end}
{synopt:{cmd:e(sampsis)}}vector of sample sizes at each side of each cutoff{p_end}


{marker references}{...}
{title:References}

{phang}
Calonico, S., M. D. Cattaneo, M. H. Farrell, and R. Titiunik. 2017.
rdrobust: Software for regression-discontinuity designs.
{it:Stata Journal} 17: 372-404.
{browse "https://doi.org/10.1177/1536867X1701700208"}.

{phang}
Calonico, S., M. D. Cattaneo, and R. Titiunik. 2014.
Robust data-driven inference in the regression-discontinuity design.
{it:Stata Journal} 14: 909-946.
{browse "https://doi.org/10.1177/1536867X1401400413"}.

{phang}
------. 2015.
rdrobust: An R package for robust nonparametric inference in
regression-discontinuity designs.
{it:R Journal} 7: 38-51.
{browse "https://doi.org/10.32614/RJ-2015-004"}.

{phang}
Cattaneo, M. D., L. Keele, R. Titiunik, and G. Vazquez-Bare. 2016.
Interpreting regression discontinuity designs with multiple cutoffs.
{it:Journal of Politics} 78: 1229-1248.
{browse "https://doi.org/10.1086/686802"}.

{phang}
------. 2020.
Extrapolating treatment effects in multi-cutoff regression discontinuity
designs.
{browse "https://cattaneo.princeton.edu/papers/Cattaneo-Keele-Titiunik-VazquezBare_2021_JASA.pdf"}.

{phang}
Cattaneo, M. D., R. Titiunik, and G. Vazquez-Bare. 2020.
Analysis of regression-discontinuity designs with multiple cutoffs or multiple
scores.
{it:Stata Journal} 20: 866-891.
{browse "https://doi.org/10.1177/1536867X20976320"}.

{phang}
Keele, L. J., and R. Titiunik. 2015.
Geographic boundaries as regression discontinuities.
{it:Political Analysis} 23: 127-155.
{browse "https://doi.org/10.1093/pan/mpu014"}.


{marker authors}{...}
{title:Authors}

{pstd}
Matias D. Cattaneo{break}
Princeton University{break}
Princeton, NJ{break}
{browse "mailto:cattaneo@princeton.edu":cattaneo@princeton.edu}{p_end}

{pstd}
Roc{c i'}o Titiunik{break}
Princeton University{break}
Princeton, NJ{break}
{browse "mailto:titiunik@princeton.edu":titiunik@princeton.edu}{p_end}

{pstd}
Gonzalo Vazquez-Bare{break}
University of California, Santa Barbara{break}
Santa Barbara, CA{break}
{browse "mailto:gvazquez@econ.ucsb.edu":gvazquez@econ.ucsb.edu}{p_end}


{marker alsosee}{...}
{title:Also see}

{p 4 14 2}
Article:  {it:Stata Journal}, volume 20, number 4: {browse "https://doi.org/10.1177/1536867X20976320":st0620}{p_end}
